package com.jdrx.sw.sewage.common.enums;

import com.jdrx.sw.sewage.common.constant.Constant;

public enum MaintenanceStatus {
    ONE_WEEK_EXPIRE(1, "一周内到期"),
    ONE_MONTH_EXPIRE(2, "一个月内到期"),
    ONE_SEASON_EXPIRE(3, "一个季度内到期");

    private Integer key;
    private String value;

    MaintenanceStatus(Integer key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getName(String key) {
        for (MaintenanceStatus status : MaintenanceStatus.values()) {
            if (key.equals(status.getKey())) {
                return status.getValue();
            }
        }
        return Constant.EMPTY;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
